//
//  CTMediator+WSPlayerAction.m
//  CharonTVProject
//
//  Created by karong on 2023/8/8.
//

#import "CTMediator+WSPlayerAction.h"
NSString * const WSCTMediatorTargetPlayer = @"Player";
NSString * const WSCTMediatorActioncharonTV_Player = @"charonTV_player";
NSString * const WSCTMediatorActioncharonTV_ChapterList = @"charonTV_chapterList";
@implementation CTMediator (WSPlayerAction)

- (UIViewController *)ct_showcharonTV_PlayerWithVideo:(id)object {
    return [self performTarget:WSCTMediatorTargetPlayer
                        action:WSCTMediatorActioncharonTV_Player
                        params:@{@"video":object}
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_ChapterListWithVideo:(id)video selectHandle:(charonTV_AnyObjectBlock)selectHandle {
    return [self performTarget:WSCTMediatorTargetPlayer
                        action:WSCTMediatorActioncharonTV_ChapterList
                        params:@{@"video":video,
                                 @"selectHandle":selectHandle
                               }
             shouldCacheTarget:YES];
}

- (UIViewController *)ct_showcharonTV_ChapterListWithVideoDetail:(id)videoDetail video:(id)video selectHandle:(charonTV_AnyObjectBlock)selectHandle {
     return [self performTarget:WSCTMediatorTargetPlayer
                        action:WSCTMediatorActioncharonTV_ChapterList
                        params:@{@"videoDetail":videoDetail,
                                 @"video":video,
                                 @"selectHandle":selectHandle
                               }
             shouldCacheTarget:YES];
}
@end
